Getting and Setting Movie Controller Time
Movie controller components provide functions that allow your application to work with temporal aspects of movie controllers. You can use the
MCSetDuration
function to set the duration of a movie controller to some arbitrary value. The
MCGetCurrentTime
function lets you retrieve the time value represented by the indicator on the movie controller's slider.
MCSetDuration
The
MCSetDuration
function allows your application to set a controller's duration in the case where a controller does not have a movie associated with it.
pascal ComponentResult MCSetDuration (MovieController mc,
TimeValue duration);
-
mc
-
Specifies the movie controller for the operation. You obtain this identifier from the Component Manager's
OpenComponent
or
OpenDefaultComponent
function, or from the
NewMovieController
function (described on
NewMovieController
).
-
duration
-
Specifies the new duration for the movie. This duration value must be in the controller's time scale.
DESCRIPTION
The controller's duration remains at this new value until you assign a movie to the controller.
SEE ALSO
You can use the
MCGetCurrentTime
function, which is described in the next section, to obtain the time scale for the controller.
MCGetCurrentTime
Your application can use the
MCGetCurrentTime
function to obtain the time value represented by the indicator on the movie controller's slider. This time value is appropriate to the movie currently being affected by the movie controller. You can also obtain the time scale for this time value.
pascal TimeValue MCGetCurrentTime (MovieController mc,
TimeScale *scale);
-
mc
-
Specifies the movie controller for the operation. You obtain this identifier from the Component Manager's
OpenComponent
or
OpenDefaultComponent
function, or from the
NewMovieController
function (described on
NewMovieController
).
-
scale
-
Contains a pointer to a field that is to receive the time scale for the controller.
DESCRIPTION
The
MCGetCurrentTime
function returns the time value that corresponds to the current setting of the indicator on the movie controller's slider.
© 1997 Apple Computer, Inc.Previous | Chapter Top | Chapter Contents | Next